#ifndef __MCS__LITERAL_EXPRESSION__HPP
#define __MCS__LITERAL_EXPRESSION__HPP

#include "Expression.hpp"

/// Expression that consists from a single literal
class LiteralExpression : public Expression
{
public:
	LiteralExpression(SourceLocation const & location, ptr<Value> value)
		: Expression(location)
		, value_(value)
	{}

	virtual ptr<Value> evaluate() const
	{
		return value_;
	}
	
	virtual Value::DataType dataType() const
	{
		return value_->dataType();
	}
private:
	ptr<Value> value_;
};

#endif //__MCS__CONST_EXPRESSION__HPP
